//
//  IAPHelper.h
//  DrawChartTest
//
//  Created by FrankLiu on 16/7/5.
//  Copyright © 2016年 FrankLiu. All rights reserved.
//

#import <Foundation/Foundation.h>
@import StoreKit;

#define ProductID_Coin1    @"com.hxzstClass1.cion"
#define ProductID_Coin2    @"com.hxzstClass2.cion"
#define ProductID_Coin3    @"com.hxzstClass3.cion"
#define ProductID_Coin4    @"com.hxzstClass4.cion"

//#define ProductID_Coin1    @"com.hxzstClassA1.cion1"
//#define ProductID_Coin2    @"com.hxzstClassA2.cion2"
//#define ProductID_Coin3    @"com.hxzstClassA3.cion3"
//#define ProductID_Coin4    @"com.hxzstClassA4.cion4"
//#define ProductID_Coin5    @"com.hxzstClassA5.cion5"
//#define ProductID_Coin6    @"com.hxzstClassA6.cion6"
//#define ProductID_Coin7    @"com.hxzstClassA7.cion7"
//#define ProductID_Coin8    @"com.hxzstClassA8.cion8"
//#define ProductID_Coin9    @"com.hxzstClassA9.cion9"
//#define ProductID_Coin10   @"com.hxzstClassA10.cion10"
//#define ProductID_Coin11   @"com.hxzstClassA11.cion11"
//#define ProductID_Coin12   @"com.hxzstClassA12.cion12"
//#define ProductID_Coin13   @"com.hxzstClassA13.cion13"
//#define ProductID_Coin14   @"com.hxzstClassA14.cion14"
//#define ProductID_Coin15   @"com.hxzstClassA15.cion15"
//#define ProductID_Coin16   @"com.hxzstClassA16.cion16"
//#define ProductID_Coin17   @"com.hxzstClassA17.cion17"
//#define ProductID_Coin18   @"com.hxzstClassA18.cion18"
//#define ProductID_Coin19   @"com.hxzstClassA19.cion19"

// 会员
#define ProductID_GoldA   @"com.hxzstMember.gold"
#define ProductID_GoldA1   @"com.hxzstMember.goldA1"

#define ProductID_SilverA   @"com.hxzstMember.silverA"
#define ProductID_SilverA1   @"com.hxzstMember.silverA1"

#define ProductID_CommonA1   @"com.hxzstMember.commonA1"
#define ProductID_CommonA2   @"com.hxzstMember.commonA2"
#define ProductID_CommonB1   @"com.hxzstMember.commonB1"
#define ProductID_CommonB2   @"com.hxzstMember.commonB2"
#define ProductID_CommonC1   @"com.hxzstMember.commonC1"
#define ProductID_CommonC2   @"com.hxzstMember.commonC2"

#define ProductID_ProductA   @"com.hxzstMember.productA"
#define ProductID_ProductB   @"com.hxzstMember.productB"

#define ProductID_StudyA   @"com.hxzstMember.studyA"
#define ProductID_StudyB   @"com.hxzstMember.studyB"
#define ProductID_StudyC   @"com.hxzstMember.studyC"

typedef enum : NSUInteger {
    ID_Coin1=1001,
    ID_Coin2=1002,
    ID_Coin3=1003,
    ID_Coin4=1004,
    ID_Coin5=1005,
    ID_Coin6=1006,
    ID_Coin7=1007,
    ID_Coin8=1008,
    ID_Coin9=1009,
    ID_Coin10=1010,
    ID_Coin11=1011,
    ID_Coin12=1012,
    ID_Coin13=1013,
    ID_Coin14=1014,
    ID_Coin15=1015,
    ID_Coin16=1016,
    ID_Coin17=1017,
    ID_Coin18=1018,
    ID_Coin19=1019,

    ID_GoldA      =2001,
    ID_GoldA1     =2002,

    ID_SilverA    =3001,
    ID_SilverA1   =3002,

    ID_CommonA1   =4001,
    ID_CommonA2   =4002,
    ID_CommonB1   =4003,
    ID_CommonB2   =4004,
    ID_CommonC1   =4005,
    ID_CommonC2   =4006,

    ID_ProductA   =5001,
    ID_ProductB   =5002,

    ID_StudyA     =6001,
    ID_StudyB     =6002,
    ID_StudyC     =6003,
    
} EIAPProductType;

@interface IAPHelper : NSObject<SKProductsRequestDelegate,SKPaymentTransactionObserver>
//@property (nonatomic, strong) NSSet             *m_productIdentifiers;
//@property (nonatomic, strong) NSArray           *m_products;
//@property (nonatomic, strong) NSMutableSet      *m_purchasedProducts;

@property (nonatomic)       EIAPProductType    m_buyType;

- (void)requestProductData;
+ (IAPHelper *)sharedData;

@end
